//
//  LJFSearchResultCell.m
//  SevenZhou
//
//  Created by qianfeng on 15/9/18.
//  Copyright (c) 2015年 ljf. All rights reserved.
//

#import "LJFSearchResultCell.h"
#import "UIImageView+AFNetworking.h"

@implementation LJFSearchResultCell

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setModel:(LJFjinDianModel *)model
{
    _model = model;
    
    [self.imgView setImageWithURL:[NSURL URLWithString:model.imageName] placeholderImage:[UIImage imageNamed:@"default_image.png"]];
    self.nameTitle.text = model.name;
    self.nowPrice.text = model.shop_price;
    self.oldPrice.text = model.market_price;
    
    if (model.app_cut_price_desc.length>0)
    {
        self.reducePrice.text = model.app_cut_price_desc;
        self.reducePrice.hidden = NO;
        self.bgimgView.hidden = NO;
    }
    else
    {
        self.reducePrice.hidden = YES;
        self.bgimgView.hidden = YES;
    }
}

@end
